package com.xiaojie.service.member.api.impl;

import com.xiaojie.service.member.api.MemberService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * ClassNameMemberServiceImpl
 *
 * @Description TODO
 * @Author yan
 * 2021/5/13 23:16
 * @Version 1.0
 **/
@RestController
public class MemberServiceImpl implements MemberService {

    @Value("${server.port}")
    private String serverPort;

    @RequestMapping("/")
    public String member(HttpServletRequest request) {
        String serverPort = request.getHeader("serverPort");
        return "this is member,网关端口号:" + serverPort;
    }

    @Override
    public String getUser(String userId) {
        return "我是会员服务" + serverPort;
    }
}
